export default {
    component: 'jzlDataList',
    icon: 'fa fa-list-alt1',
    name: 'DataList',
    box_style: {
        _fix: "all",
        header: {
            title: {
                _ss: {
                    "text": "数据列表"
                }
            },
            icon: {
                _ss: {
                    icon: "fa fa-table"
                }
            }
        }
    },
    ele_style: {
        _name: '表格/列表',
        _fix: "all",
        _render: '_ele',
        _ss: {
            "display": "default"
        },
        _sh: {},
        _rh: false,

        row: {
            _name: '列表行(仅列表)',
            _render: '_row',
            _node: 'div',
            _ss: {},
            _sh: {},
            _rh: false
        },
        item: {
            _name: '列表项(仅列表)',
            _render: '_item',
            _node: 'div',
            _ss: {},
            _sh: {},
            _rh: false,
            _sort: [ 'label', 'value' ],

            label: {
                _name: '项目名',
                _render: '_label',
                _node: 'text',
                _ss: {
                    display: "block"
                },
                _sh: {},
                _rh: false,
            },
            value: {
                _name: '项目值',
                _render: '_value',
                _node: 'text',
                _ss: {},
                _sh: {},
                _rh: false
            }
        },
        itemHeader: {
            _name: '列表项标题(仅列表支持)',
            _node: 'div',
            _ss: {
                bgType: 'color',
                backgroundColor: '#FAFAFA'
            },
            _sh: {},
            _rh: false,

            label: {
                _name: '项目名',
                _node: 'text',
                _ss: {
                    display: "none"
                },
                _sh: {},
                _rh: false
            },
            value: {
                _name: '项目值',
                _node: 'text',
                _ss: {
                    fontType: "set",
                    textAlign: "left",
                    color: '#333',
                    fontWeight: "bold"
                },
                _sh: {},
                _rh: false
            },
            rightIcon: {
                _name: '右图标',
                _node: 'icon',
                _ss: {
                    icon: "fa fa-angle-right"
                },
                _sh: {},
                _rh: false
            }
        }
    },
    setting: {
        sticky: false,
        showStyle: "list",
        listTheme: "normal",
        // loadMode: "",   // fixed - 定长内容 infinite - 滑到底部加载更多
        pageSize: 20,   // 每页数量
    },
    setting_schema: {
        "$schema": "http://json-schema.org/draft-04/schema#",
        "title": "数据列表 DataList 参数设置",
        "description": "",
        "type": "object",
        "properties": {
            "showStyle": {
                "title": "排列方式",
                "type": "string",
                "ui:widget": "RadioWidget",
                "enum": [
                    "table",
                    "list"
                ],
                "enumNames": [
                    "表格",
                    "列表"
                ],
                "default": "list"
            },
            "listTheme": {
                "title": "列表样式",
                "type": "boolean",
                "ui:widget": "RadioWidget",
                "enum": [
                    "normal",
                    "title"
                ],
                "enumNames": [
                    "通用",
                    "标题栏"
                ],
                "default": "normal"
            }
        }
    },
    vars: [{
        prop: "model",
        type: "table",
        default: null,
        force: true,
        fixType: true,
        initType: "static",
        iTypes: [ 'static', 'api' ],

        defaultTable: [
            [ "日期", "销售量Bar" ],
            [ "1月1日", "123" ],
            [ "1月2日", "1223" ],
            [ "1月3日", "2123" ],
            [ "1月4日", "4123" ],
            [ "1月5日", "3123" ],
            [ "1月6日", "7123" ]
        ]
    }],
}
